package com.ltmonitor.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 用户参数设置
 */
@Entity
@org.hibernate.annotations.Proxy(lazy = false)
@Table(name = "UserPreference")
public class UserPreference implements Serializable {
    public UserPreference()
    {
        streamType = 1;
        maxAudioListeningTime = 5;
        maxVideoPreviewTime = 5;
        createDate = new Date();
        updateDate = new Date();
    }
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private long entityId;
    private long userId;
    /**
     * 最长观看视频的时间，分钟为单位
     */
    private int maxVideoPreviewTime;
    /**
     * 音频监听或对讲时间，分钟为单位
     */
    private int maxAudioListeningTime;
    /**
     * 0主码流 1子码流
     */
    private int streamType;
    /**
     * 0音视频 1视频
     */
    private int videoDataType;

    private Date createDate;

    private Date updateDate;

    public long getEntityId() {
        return entityId;
    }

    public void setEntityId(long entityId) {
        this.entityId = entityId;
    }

    /**
     * 最长观看视频的时间
     */
    public int getMaxVideoPreviewTime() {
        return maxVideoPreviewTime;
    }

    public void setMaxVideoPreviewTime(int maxVideoPreviewTime) {
        this.maxVideoPreviewTime = maxVideoPreviewTime;
    }

    /**
     * 最长语音对讲或监听时间
     */
    public int getMaxAudioListeningTime() {
        return maxAudioListeningTime;
    }

    public void setMaxAudioListeningTime(int maxAudioListeningTime) {
        this.maxAudioListeningTime = maxAudioListeningTime;
    }

    /**
     * 默认视频码流类型
     */
    public int getStreamType() {
        return streamType;
    }

    public void setStreamType(int streamType) {
        this.streamType = streamType;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    /**
     * 0音视频 1视频
     */
    public int getVideoDataType() {
        return videoDataType;
    }

    public void setVideoDataType(int videoDataType) {
        this.videoDataType = videoDataType;
    }
}
